<?php session_start();
include "include/db.php";
if (!$_SESSION['user']) 
    {
        header("Location: index.php");
    }

$sql ="SELECT * FROM address";
$res = mysql_query($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>List of Address</title>
</head>

<body>

<table border="1" align="center" bgcolor="#CCCCCC">
<tr><th><a href="welcome.php">Home</a></th></tr>
	<tr>
		<th>Id</th>
		<th>Name</th>
		<th>Lin1</th>
		<th>Line2</th>
		<th>City</th>
		<th>Postcode</th>
	</tr>
	
	<?php
	while($row = mysql_fetch_assoc($res))
	{	
	?>
	</tr>
	<td><?php echo $row['add_id']; ?></td>
	<td><?php echo $row['name']; ?></td>
	<td><?php echo $row['line1']; ?></td>
	<td><?php echo $row['line2']; ?></td>
	<td><?php echo $row['city']; ?></td>
	<td><?php echo $row['postcode']; ?></td>
	</tr>
	<?php } ?>
	
</table>
</body>
</html>
